using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.ObjectModel;

namespace Toon.Models.Catalogs
{
	public class ShitckDefinitionCollection : ReadOnlyCollection<ShitckDefinition> 
	{
		public ShitckDefinitionCollection(IList<ShitckDefinition> list)
			: base(list)
		{
			
		}

	}
    public class AttributeDefinitionCollection : ReadOnlyCollection<Toon.Models.Catalogs.AttributeDefinition>
	{
        public AttributeDefinitionCollection(IList<Toon.Models.Catalogs.AttributeDefinition> list)
			: base(list)
		{ }

        public Toon.Models.Catalogs.AttributeDefinition this[string key]
		{
			get { return this.Where(a => a.AttributeName == key).SingleOrDefault(); }
		}
	}
}
